<?php

use App\Http\Controllers\Wx\GrouponController;
use App\Http\Controllers\Wx\HomeController;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Wx\AuthController;
use App\Http\Controllers\Wx\AddressController;
use App\Http\Controllers\Wx\CatalogController;
use App\Http\Controllers\Wx\BrandController;
use App\Http\Controllers\Wx\GoodsController;
use App\Http\Controllers\Wx\CouponController;


// 肚子 88.5
// 腿 60.5
// 小腿 37
// 肩膀 46
// 胳膊 33

// 账号注册
Route::post('auth/register', [AuthController::class, 'register']);
// 获取 注册验证码
Route::post('auth/regCaptcha', [AuthController::class, 'regCaptcha']);
// 账号登录
Route::post('auth/login', [AuthController::class, 'login']);
// 用户信息
Route::get('auth/info', [AuthController::class, 'info']);
// 账号登出
Route::post('auth/logout', [AuthController::class, 'logout']);
// 账号密码重置
Route::post('auth/reset', [AuthController::class, 'reset']);
// 账号修改
Route::post('auth/profile', [AuthController::class, 'profile']);
// 验证码
Route::post('auth/captcha', [AuthController::class, 'regCaptcha']);

# 用户模块 - 地址
// 收货地址列表
Route::get('address/list', [AddressController::class, 'list']);
// 收货地址详情
Route::get('address/detail', [AddressController::class, 'detail']);//'AddressController@detail');
// 保存收货地址
Route::post('address/save', [AddressController::class, 'save']);
// 删除收货地址
Route::post('address/delete', [AddressController::class, 'delete']);

// 商品模块
Route::get('catalog/index', [CatalogController::class, 'index']);
Route::get('catalog/current', [CatalogController::class, 'current']);

// 商品模块-品牌
Route::get('brand/list', [BrandController::class, 'list']); // 品牌列表
Route::get('brand/detail', [BrandController::class, 'detail']); // 品牌详情

// 商品模块-商品
// 统计商品总数
Route::get('goods/count', [GoodsController::class, 'count']);
// 获取商品列表
Route::get('goods/list', [GoodsController::class, 'list']);
// 根据分类获取商品列表数据
Route::get('goods/category', [GoodsController::class, 'category']);
// 获取商品详情
Route::get('goods/detail', [GoodsController::class, 'detail']);

// 优惠券相关
// 优惠券列表
Route::get('coupon/list', [CouponController::class, 'list']);
// 优惠券列表 (用户优惠券列表)
Route::get('coupon/mylist', [CouponController::class, 'mylist']);
// 领取优惠券
Route::post('coupon/receive', [CouponController::class, 'receive']);
// todo 当前订单可使用优惠券列表(跟购物车有关)
//Route::get('coupon/selectlist', [CouponController::class, 'selectlist']);

// 团购列表
Route::get('groupon/list', [GrouponController::class, 'list']);
Route::get('groupon/test', [GrouponController::class, 'test']);

Route::get('home/redirectShareUrl', [HomeController::class, 'redirectShareUrl'])->name('home.redirectShareUrl');